﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GtsServer.DAL;
using GtsServer.Model;
using System.Data;
using GtsServer.Common;

namespace GtsServer.Manage.Controller
{
    public class GameannouncementController
    {
        NoticeDAL dal = new NoticeDAL();
        public List<Notice> GetListByTaskID(int taskID)
        {
            List<Notice> list = new List<Notice>();
            DataSet ds = dal.GetListByTaskID(taskID);
            list = IListDataSet.DataSetToIList<Notice>(ds, 0).ToList();
            return list;

        }
        public int Add(Notice models)
        {
            return dal.Add(models);
        }
        public bool Update(Notice model)
        {
            return dal.UpdateClass(model);
        }
        public bool Delete(int ID)
        {
            return dal.Delete(ID);
        }
    }
}
